home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Linux
/
Kubuntu 8.10
/
kubuntu-8.10-desktop-i386.iso
/
casper
/
filesystem.squashfs
/
etc
/
power
/
event.d
/
laptop-mode
Wrap
Text File
|
2008-10-24
|
811b
|
36 lines
#!/bin/sh
# name : laptop-mode
# author : Matthias Grimm <matthiasgrimm@users.sourceforge.net>
# description : toggle laptop mode in kernel and adjust
# memory management buffer flush timeouts
# requirements: laptop-mode support in kernel
# laptopmode.sh somewhere on your system
# limitations : none
#
# --- end of public part -- don't change below this line ---
set -e
LMODE=/usr/sbin/laptop_mode
[ -x $LMODE ] || exit 0
if [ -w /proc/sys/vm/laptop_mode ]; then
case "$1" in
powersave)
$LMODE "start"
echo "3 " $LMODE "start"
;;
custom)
$LMODE "auto"
;;
performance)
$LMODE "stop"
;;
esac
elif [ -x logger ]; then
logger -p daemon.error -t laptop-mode "Laptop-mode support missing in kernel."
fi